package com.ruoyi.bookstore.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bookstore.mapper.BorrowBooksMapper;
import com.ruoyi.bookstore.domain.BorrowBooks;
import com.ruoyi.bookstore.service.IBorrowBooksService;

/**
 * 借书记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-07-20
 */
@Service
public class BorrowBooksServiceImpl implements IBorrowBooksService 
{
    @Autowired
    private BorrowBooksMapper borrowBooksMapper;

    /**
     * 查询借书记录
     * 
     * @param id 借书记录主键
     * @return 借书记录
     */
    @Override
    public BorrowBooks selectBorrowBooksById(Long id)
    {
        return borrowBooksMapper.selectBorrowBooksById(id);
    }

    /**
     * 查询借书记录列表
     * 
     * @param borrowBooks 借书记录
     * @return 借书记录
     */
    @Override
    public List<BorrowBooks> selectBorrowBooksList(BorrowBooks borrowBooks)
    {
        return borrowBooksMapper.selectBorrowBooksList(borrowBooks);
    }

    /**
     * 新增借书记录
     * 
     * @param borrowBooks 借书记录
     * @return 结果
     */
    @Override
    public int insertBorrowBooks(BorrowBooks borrowBooks)
    {
        return borrowBooksMapper.insertBorrowBooks(borrowBooks);
    }

    /**
     * 修改借书记录
     * 
     * @param borrowBooks 借书记录
     * @return 结果
     */
    @Override
    public int updateBorrowBooks(BorrowBooks borrowBooks)
    {
        return borrowBooksMapper.updateBorrowBooks(borrowBooks);
    }

    /**
     * 批量删除借书记录
     * 
     * @param ids 需要删除的借书记录主键
     * @return 结果
     */
    @Override
    public int deleteBorrowBooksByIds(Long[] ids)
    {
        return borrowBooksMapper.deleteBorrowBooksByIds(ids);
    }

    /**
     * 删除借书记录信息
     * 
     * @param id 借书记录主键
     * @return 结果
     */
    @Override
    public int deleteBorrowBooksById(Long id)
    {
        return borrowBooksMapper.deleteBorrowBooksById(id);
    }
}
